graphics Drawing effective ( and beautiful ) graphs with TEX

نویسنده

  • Jean-luc Doumont
چکیده

A standard approach to producing documents that include illustrations consists in typesetting text with specialized typesetting software (such as TEX) and inserting illustrations created with different, equally specialized software. To better integrate the illustrations into the typeset page, it would be nice to be able to produce or modify them directly with the typesetting software. Drawing graphs with TEX, for example, would allow one to set them \hsize wide and 0.75\hsize high, position labels exactly \baselineskip below the horizontal axis, and, especially, typeset all annotations with the same fonts, sizes, and mathematical beauty as the rest of the document. The hybrid TEX and PostScript macros presented in this paper take advantage of TEX’s power to graph and annotate data sets in a variety of ways in order to produce effective, beautiful, well-integrated graphs. They use TEX to draw all horizontal and vertical lines (axes, tick marks, grid lines) and set all annotations, and PostScript to draw the data, as markers, lines, and areas. While fairly simple, they have been successfully harnessed to appear in a wide range of real-life applications, up to logarithmic graphs and (with some patience) complex multipanel displays. Of course, the macros are a tool for drawing final graphs rather than exploring or transforming data sets. Most designers produce documents by assembling components produced with different tools: typically, they typeset text with a text-oriented application and create illustrations with one or several drawing or graphing applications. This approach, it would seem, offers the best of both worlds, by using the best-suited tool for each part of the job. Unfortunately, it often suffers one – in some cases, major – drawback: the poor integration of the illustrations in the typeset page. Though increasingly sophisticated, graphing applications still offer but limited control over some details of the display, all the more so if their focus is data manipulation rather than data visualization. Among the less accessible parameters are: the size of the display and the size and position of the graphing area within the display, etc.; the thickness of the axes, the length of the major and minor tick marks, the length and spacing of line segments in dashed lines, etc.; the typeface used for text elements and their relative or absolute position (including suband superscripts). As a consultant on technical communication, including graphing, I am disappointed with the output of many graphing applications (or at the considerable efforts needed to produce acceptable output). In line with the recommendations of such authors as Jacques Bertin (1973), William Cleveland (1985), and Edward Tufte (1983), I encourage the participants of my training programs to produce simple, intuitive, visually correct representations that favor data over decoration. Yet I find the default output of many applications to be overdecorated or hard to decipher. I was in search of a system that would help one focus on data, not decoration, much in the way TEX can help one focus on logical structuring, not visual rendering. The idea of harnessing TEX to draw figures is nothing new, going back at least to Leslie Lamport’s original LATEX package. The basic principle is always the same: define a coordinate system and position objects with respect to it by utilizing all of TEX’s accuracy. The macros presented in this paper follow this principle but introduce some new ideas, such as using stretchable glue (rather than coordinate calculations) to position tick marks. My graphing macros were developed in several steps. Originally, I was using dedicated graphing software but became frustrated with the poorly set text elements it offered, especially as soon as these involved any level of mathematics (symbols, subor superscripts, etc.). I then began to produce graphs without any annotation, insert them into my TEX source files, and overprint all text elements, including numerical labels along the axes. I soon realized that if I was able to place numbers along axes properly, I could as easily add a tick mark next to each, so I decided to display the data themselves with graphing software and draw axes and grids with TEX. Displaying the data with PostScript code inserted into TEX was the logical next step. This paper first explains the principles underlying the macros for drawing axes, data, and annotations, then dis-

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Drawing effective (and beautiful) graphs with TEX

A standard approach to producing documents that include illustrations consists in typesetting text with specialized typesetting software (such as TEX) and inserting illustrations created with other, equally specialized software. To integrate the illustrations better into the typeset page, though, it would be nice to be able to produce or modify them directly with the typesetting software. Drawi...

متن کامل

Graphics with TikZ

Abstract Beautiful and expressive documents often require beautiful and expressive graphics. PGF and its front-end TikZ walk a thin line between power, portability and usability, giving a TEX-like approach to graphics. While PGF and TikZ are extensively documented, first-time users may prefer learning about these packages using a collection of graduated examples. The examples presented here cov...

متن کامل

Graphics with PGF and TikZ

Beautiful and expressive documents often require beautiful and expressive graphics. PGF and its front-end TikZ walk a fine line between power, portability and usability, giving a TEX-like approach to graphics. While PGF and TikZ are extensively documented, first-time users may prefer learning about these packages using a collection of graduated examples. The examples presented here cover a wide...

متن کامل

Asymptote: Interactive T E X-aware 3d Vector Graphics

Asymptote is a powerful descriptive vector graphics language for technical drawing recently developed at the University of Alberta. It attempts to do for figures what (L)TEX does for equations. In contrast to METAPOST, Asymptote features robust floatingpoint numerics, high-order functions, and a C++/ Java-like syntax. It uses the simplex linear programming method to resolve overall size constra...

متن کامل

Asymptote: Lifting TEX to three dimensions

Asymptote, a modern successor to the METAPOST vector graphics language that features robust floatingpoint numerics, high-order functions, and deferred drawing, has recently been enhanced to generate fully interactive three-dimensional output. This data can either be viewed with Asymptote’s native OpenGL-based renderer or internally converted to Adobe’s highly compressed PRC format for embedding...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2002